import service from '../utils/request'

export function fetchDepartmentListByName (params) {
  return service({
    url: '/dept/get',
    method: 'get',
    params
  })
}
// 查询
export function fetchDepartmentList (data) {
  return service({
    url: '/major/select',
    method: 'post',
    data
  })
}

export function deleteDepartment (params) {
  return service({
    url: `/major/${params}`,
    method: 'delete'
  })
}

export function editDepartment (data) {
  return service({
    url: '/major',
    method: 'put',
    data
  })
}

export function addDepartment (data) {
  return service({
    url: '/major',
    method: 'post',
    data
  })
}